home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / NDK / NDK_3.5 / Documentation / Autodocs / wb.doc < prev    next >
Encoding:
Text File  |  1999-10-22  |  48.8 KB  |  1,413 lines

  1. TABLE OF CONTENTS
  2.  
  3. workbench.library/AddAppIconA
  4. workbench.library/AddAppMenuItemA
  5. workbench.library/AddAppWindowA
  6. workbench.library/AddAppWindowDropZoneA
  7. workbench.library/ChangeWorkbenchSelectionA
  8. workbench.library/CloseWorkbenchObjectA
  9. workbench.library/MakeWorkbenchObjectVisibleA
  10. workbench.library/OpenWorkbenchObjectA
  11. workbench.library/RemoveAppIcon
  12. workbench.library/RemoveAppMenuItem
  13. workbench.library/RemoveAppWindow
  14. workbench.library/RemoveAppWindowDropZone
  15. workbench.library/WBInfo
  16. workbench.library/WorkbenchControlA
  17. workbench.library/AddAppIconA                   workbench.library/AddAppIconA
  18.  
  19.    NAME
  20.     AddAppIconA - add an icon to Workbench's list of AppIcons.       (V36)
  21.  
  22.    SYNOPSIS
  23.     AppIcon = AddAppIconA(id, userdata, text, msgport,
  24.        D0                 D0     D1      A0     A1
  25.  
  26.                           lock, diskobj, taglist)
  27.                           A2      A3      A4
  28.  
  29.     struct AppIcon *AddAppIconA(ULONG, ULONG, char *,
  30.             struct MsgPort *, BPTR, struct DiskObject *,
  31.             struct TagItem *);
  32.  
  33.     Alternate, varargs version:
  34.     struct AppIcon *AddAppIcon(ULONG, ULONG, char *,
  35.                                struct MsgPort *, BPTR,
  36.                                struct DiskObject *,
  37.                                tag1, data1,
  38.                                tag2, data2,
  39.                                ...
  40.                                TAG_END );
  41.  
  42.    FUNCTION
  43.     Attempt to add an icon to Workbench's list of AppIcons.  If
  44.     successful, the icon is displayed on the Workbench backdrop (the
  45.     same place disk icons are displayed).
  46.  
  47.     This call is provided to allow applications to be notified when
  48.     a graphical object (not neccessarely associated with a file)
  49.     gets 'manipulated'.
  50.  
  51.     The notification consists of an AppMessage (found in workbench.h/i)
  52.     of type 'MTYPE_APPICON' arriving at the message port you specified.
  53.  
  54.     The types of 'manipulation' that can occur are:
  55.  
  56.     1. Double-clicking on the icon.  am_NumArgs will be zero and
  57.        am_ArgList will be NULL.
  58.     2. Dropping an icon or icons on your AppIcon.  am_NumArgs will
  59.        be the number of icons dropped on your AppIcon plus one.
  60.        am_ArgList will be an array of pointers to WBArg structures.
  61.        Refer to the 'WBStartup Message' section of the RKM for more info.
  62.     3. Dropping your AppIcon on another icon.  NOT SUPPORTED.
  63.     4. Invoking an "Icons" menu item with your icon selected. (V44)
  64.        You have to tell Workbench which menu items your icon
  65.        responds to using the tag item list you provide to AddAppIconA().
  66.        When one of the supported menu items is invoked, you
  67.        will receive an AppMessage with the am_Class entry set to
  68.        a value out of AMCLASSICON_Open..AMCLASSICON_EmptyTrash,
  69.        corresponding to the menu item used.
  70.  
  71.    INPUTS
  72.     id - this variable is strictly for your own use and is ignored by
  73.          Workbench.  Typical uses in C are in switch and case statements,
  74.          and in assembly language table lookup.
  75.     userdata - this variable is strictly for your own use and is ignored
  76.                by Workbench.
  77.     text - name of icon (char *)
  78.     lock - NULL    (Currently unused)
  79.     msgport - pointer to message port Workbench will use to send you an
  80.               AppMessage message of type 'MTYPE_APPICON' when your icon
  81.               gets 'manipulated' (explained above).
  82.     diskobj - pointer to a DiskObject structure filled in as follows:
  83.         do_Magic - NULL
  84.         do_Version - NULL
  85.         do_Gadget - a gadget structure filled in as follows:
  86.             NextGadget - NULL
  87.             LeftEdge - NULL
  88.             TopEdge - NULL
  89.             Width - width of icon hit-box
  90.             Height - height of icon hit-box
  91.             Flags - NULL or GADGHIMAGE
  92.             Activation - NULL
  93.             GadgetType - NULL
  94.             GadgetRender - pointer to Image structure filled in as follows:
  95.                 LeftEdge - NULL
  96.                 TopEdge - NULL
  97.                 Width - width of image (must be <= Width of hit box)
  98.                 Height - height of image (must be <= Height of hit box)
  99.                 Depth - # of bit-planes in image
  100.                 ImageData - pointer to actual word aligned bits (CHIP MEM)
  101.                 PlanePick - Plane mask ((1 << depth) - 1)
  102.                 PlaneOnOff - 0
  103.                 NextImage - NULL
  104.             SelectRender - pointer to alternate Image struct or NULL
  105.             GadgetText - NULL
  106.             MutualExclude - NULL
  107.             SpecialInfo - NULL
  108.             GadgetID - NULL
  109.             UserData - NULL
  110.         do_Type - NULL
  111.         do_DefaultTool - NULL
  112.         do_ToolTypes - NULL
  113.         do_CurrentX - NO_ICON_POSITION (recommended)
  114.         do_CurrentY - NO_ICON_POSITION (recommended)
  115.         do_DrawerData - NULL
  116.         do_ToolWindow - NULL
  117.         do_StackSize - NULL
  118.  
  119.     (an easy way to create one of these (a DiskObject) is to create an icon
  120.      with the V2.0 icon editor and save it out.  Your application can then
  121.      call GetDiskObject on it and pass that to AddAppIcon.)
  122.  
  123.     taglist - ptr to a list of tag items.  Must be NULL for V2.0.
  124.  
  125.    TAGS
  126.     WBAPPICONA_SupportsOpen (BOOL) -- Set this to TRUE if your
  127.         AppIcon should respond to the "Open" menu, to FALSE
  128.         otherwise. Note that with this attribute set to FALSE,
  129.         users will still be able to double-click on your AppIcon
  130.         and drop icons on it. This attribute solely controls
  131.         whether the "Open" menu item will be available.
  132.  
  133.         This tag defaults to TRUE. (V44)
  134.  
  135.     WBAPPICONA_SupportsCopy (BOOL) -- Set this to TRUE if your
  136.         AppIcon should respond to the "Copy" menu, to FALSE
  137.         otherwise.
  138.  
  139.         This tag defaults to FALSE. (V44)
  140.  
  141.     WBAPPICONA_SupportsRename (BOOL) -- Set this to TRUE if your
  142.         AppIcon should respond to the "Rename" menu, to FALSE
  143.         otherwise.
  144.  
  145.         This tag defaults to FALSE. (V44)
  146.  
  147.     WBAPPICONA_SupportsInformation (BOOL) -- Set this to TRUE if your
  148.         AppIcon should respond to the "Information" menu, to FALSE
  149.         otherwise.
  150.  
  151.         This tag defaults to FALSE. (V44)
  152.  
  153.     WBAPPICONA_SupportsSnapshot (BOOL) -- Set this to TRUE if your
  154.         AppIcon should respond to the "Snapshot" menu, to FALSE
  155.         otherwise.
  156.  
  157.         This tag defaults to FALSE. (V44)
  158.  
  159.     WBAPPICONA_SupportsUnSnapshot (BOOL) -- Set this to TRUE if your
  160.         AppIcon should respond to the "UnSnapshot" menu, to FALSE
  161.         otherwise.
  162.  
  163.         This tag defaults to FALSE. (V44)
  164.  
  165.     WBAPPICONA_SupportsLeaveOut (BOOL) -- Set this to TRUE if your
  166.         AppIcon should respond to the "Leave Out" menu, to FALSE
  167.         otherwise.
  168.  
  169.         This tag defaults to FALSE. (V44)
  170.  
  171.     WBAPPICONA_SupportsPutAway (BOOL) -- Set this to TRUE if your
  172.         AppIcon should respond to the "Put Away" menu, to FALSE
  173.         otherwise.
  174.  
  175.         This tag defaults to FALSE. (V44)
  176.  
  177.     WBAPPICONA_SupportsDelete (BOOL) -- Set this to TRUE if your
  178.         AppIcon should respond to the "Delete" menu, to FALSE
  179.         otherwise.
  180.  
  181.         This tag defaults to FALSE. (V44)
  182.  
  183.     WBAPPICONA_SupportsFormatDisk (BOOL) -- Set this to TRUE if your
  184.         AppIcon should respond to the "Format Disk" menu, to FALSE
  185.         otherwise.
  186.  
  187.         This tag defaults to FALSE. (V44)
  188.  
  189.     WBAPPICONA_SupportsEmptyTrash (BOOL) -- Set this to TRUE if your
  190.         AppIcon should respond to the "Empty Trash" menu, to FALSE
  191.         otherwise.
  192.  
  193.         This tag defaults to FALSE. (V44)
  194.  
  195.     WBAPPICONA_PropagatePosition (BOOL) -- Set this to TRUE if you
  196.         want the AppIcon's position to be propagated back to the
  197.         original DiskObject you passed to this function. By
  198.         default, Workbench will make a copy of that DiskObject's
  199.         icon imagery, allowing you to free the DiskObject.
  200.         But if you specify "WBAPPICONA_PropagatePosition,TRUE,"
  201.         Workbench will assume that you will not free it and
  202.         that the AppIcon's current position should be stored
  203.         in its do_CurrentX/do_CurrentY members.
  204.  
  205.         This tag defaults to FALSE. (V44)
  206.  
  207.     WBAPPICONA_RenderHook (struct Hook *) -- Pointer to a hook that
  208.         will be invoked when rendering your AppIcon. With this hook
  209.         and WorkbenchControlA() you can create dynamic or animated
  210.         AppIcons. Your hook will be called with the following
  211.         parameters and has to return a result value:
  212.  
  213.         result = hookFunc(hook,reserved,arm)
  214.           D0               A0     A2     A1
  215.  
  216.         LONG hookFunc(struct Hook *hook,APTR reserved,
  217.                       struct AppIconRenderMsg *arm);
  218.  
  219.         The reserved parameter will be set to NULL (V44).
  220.  
  221.         If your hook code returns TRUE, the AppIcon's regular image
  222.         will be drawn. If your code returns FALSE, the regular image
  223.         will not be drawn; this allows you to do all the icon's on-screen
  224.         rendering with the exception of the icon image used when dragging
  225.         the icon on the screen.
  226.  
  227.         The render message contents are as follows:
  228.  
  229.             arm_RastPort
  230.                 A pointer to the RastPort to render into.
  231.  
  232.             arm_Icon
  233.                 A pointer to the Icon to be rendered.
  234.  
  235.             arm_Label
  236.                 A pointer to the label text to be printed
  237.                 below the icon.
  238.  
  239.             arm_Tags
  240.                 Further control tags which you should pass on
  241.                 to icon.library/DrawIconStateA, should you
  242.                 call this routine.
  243.  
  244.             arm_Left
  245.             arm_Top
  246.                 Rendering origin; note that these coordinates
  247.                 DO NOT take the embossing border sizes into
  248.                 account.
  249.  
  250.             arm_Width
  251.             arm_Height
  252.                 Size of the Icon's image area; you should limit
  253.                 your drawing to this area.
  254.  
  255.             arm_State
  256.                 An icon drawing state, such as used by
  257.                 icon.library/DrawIconStateA.
  258.  
  259.         Note that all the data in the render message is read-only.
  260.  
  261.  
  262.         This tag defaults to NULL. (V44)
  263.  
  264.     WBAPPICONA_NotifySelectState (BOOL) -- Set this tag to TRUE
  265.         if you want to be be notified whenever the AppIcon becomes
  266.         selected or unselected. You will hear only state transitions,
  267.         i.e. changes from selected to unselected state and the other
  268.         way round. On a state transition you will receive AppMessages
  269.         with the AppMessage->am_Class member set to AMCLASSICON_Selected
  270.         or AMCLASSICON_Unselected, respectively.
  271.  
  272.         This tag defaults to FALSE. (V44)
  273.  
  274.    RESULTS
  275.     AppIcon - a pointer to an AppIcon structure which you pass to
  276.               RemoveAppIcon when you want to remove the icon
  277.               from Workbench's list of AppIcons.  NULL
  278.               if Workbench was unable to add your icon; typically
  279.               happens when Workbench is not running or under low
  280.               memory conditions.
  281.  
  282.    EXAMPLE
  283.     You could design a print-spooler icon and add it to the Workbench.
  284.     Any file dropped on the print spooler would be printed.  If the
  285.     user double-clicked (opened) your printer-spooler icon, you could
  286.     open a window showing the status of the print spool, allow changes
  287.     to print priorities, allow deletions, etc.  If you registered this
  288.     window as an 'AppWindow' (explained in workbench.library/AddAppWindow)
  289.     files could also be dropped in the window and added to the spool.
  290.  
  291.    NOTES
  292.     For this function call to succeed, Workbench must be open. This
  293.     means that the LoadWB command was executed and the Workbench
  294.     screen has been opened.
  295.  
  296.    SEE ALSO
  297.     workbench.library/RemoveAppIcon
  298.     workbench.library/WorkbenchControlA
  299.     icon.library/DrawIconStateA
  300.  
  301.    BUGS
  302.     In workbench.library versions 36 through 40 Info cannot be obtained
  303.     on appicons.
  304.  
  305. workbench.library/AddAppMenuItemA           workbench.library/AddAppMenuItemA
  306.  
  307.    NAME
  308.     AddAppMenuItemA - add a menu item to Workbench's list            (V36)
  309.                          of AppMenuItems.
  310.  
  311.    SYNOPSIS
  312.     AppMenuItem = AddAppMenuItemA(id, userdata, text, msgport, taglist)
  313.     D0                            D0     D1      A0     A1       A2
  314.  
  315.     struct AppMenuItem *AddAppMenuItemA(ULONG, ULONG, char *,
  316.                                         struct MsgPort *,
  317.                                         struct TagItem *);
  318.  
  319.     Alternate, varargs version:
  320.     struct AppMenuItem *AddAppMenuItem(ULONG, ULONG, char *,
  321.                                        struct MsgPort *,
  322.                                        tag1, data1,
  323.                                        tag2, data2,
  324.                                        ...
  325.                                        TAG_END );
  326.  
  327.    FUNCTION
  328.     Attempt to add the text as a menu item to Workbench's list
  329.     of AppMenuItems (the 'Tools' menu strip).
  330.  
  331.    INPUTS
  332.     id - this variable is strictly for your own use and is ignored by
  333.          Workbench.  Typical uses in C are in switch and case statements,
  334.          and in assembly language table lookup.
  335.     userdata - this variable is strictly for your own use and is ignored
  336.                by Workbench.
  337.     text - text for the menu item (char *); starting with V44, any menu
  338.            label consisting entirely of '-', '_' or '~' characters will
  339.            result in a separator bar to be added in place of a textual
  340.            item.
  341.     msgport - pointer to message port Workbench will use to send you an
  342.               AppMessage message of type 'MTYPE_APPMENUITEM' when your
  343.               menuitem gets selected.
  344.     taglist - ptr to a list of tag items.  Must be NULL for V2.0.
  345.  
  346.    TAGS
  347.     WBAPPMENUA_CommandKeyString (STRPTR) -- Command key to assign to
  348.         this AppMenu. This must be a NUL-terminated string. If the
  349.         string is empty, it will be ignored. Also, if the command key
  350.         is already in use by a different menu item it will be ignored,
  351.         too. In any case, only the first character of the string will
  352.         be used (V44).
  353.  
  354.         This tag defaults to NULL.
  355.  
  356.    RESULTS
  357.     AppMenuItem - a pointer to an appmenuitem structure which you pass to
  358.                   RemoveAppMenuItem when you want to remove the menuitem
  359.                   from Workbench's list of AppMenuItems.  NULL if
  360.                   workbench was unable to add your menu item; typically
  361.                   happens when Workbench is not running or under low
  362.                   memory conditions.
  363.  
  364.               Starting with V44 NULL will be returned if you attempt to
  365.               add an AppMenu item to a menu which already contains 63
  366.               menu items.
  367.  
  368.    NOTES
  369.     For this function call to succeed, Workbench must be open. This
  370.     means that the LoadWB command was executed and the Workbench
  371.     screen has been opened.
  372.  
  373.    SEE ALSO
  374.     workbench.library/RemoveAppMenuItem
  375.  
  376.    BUGS
  377.     workbench.library V37 through V40 does not limit the number of menu
  378.     items to 63. Any menu items after the 63rd will not be selectable.
  379.     This bug was fixed in V44.
  380.  
  381. workbench.library/AddAppWindowA               workbench.library/AddAppWindowA
  382.  
  383.    NAME
  384.     AddAppWindowA - add a window to Workbench's list of AppWindows.  (V36)
  385.  
  386.    SYNOPSIS
  387.     AppWindow = AddAppWindowA(id, userdata, window, msgport, taglist)
  388.     D0                        D0     D1       A0      A1       A2
  389.  
  390.     struct AppWindow *AddAppWindowA(ULONG, ULONG, struct Window *,
  391.                                     struct MsgPort *, struct TagItem *);
  392.  
  393.     Alternate, varargs version:
  394.     struct AppWindow *AddAppWindow(ULONG, ULONG, struct Window *,
  395.                                    struct MsgPort *
  396.                                    tag1, data1,
  397.                                    tag2, data2,
  398.                                    ...
  399.                                    TAG_END );
  400.  
  401.    FUNCTION
  402.     Attempt to add the window to Workbench's list of AppWindows.
  403.     Normally non-Workbench windows (those not opened by Workbench)
  404.     cannot have icons dropped in them.  This call is provided to
  405.     allow applications to be notified when an icon or icons get
  406.     dropped inside a window that they have registered with Workbench.
  407.     The notification consists of an AppMessage (found in workbench.h/i)
  408.     of type 'MTYPE_APPWINDOW' arriving at the message port you specified.
  409.     What you do with the list of icons (pointed to by am_ArgList) is
  410.     up to you, but generally you would want to call GetDiskObjectNew on
  411.     them.
  412.  
  413.    INPUTS
  414.     id - this variable is strictly for your own use and is ignored by
  415.          Workbench.  Typical uses in C are in switch and case statements,
  416.          and in assembly language table lookup.
  417.     userdata - this variable is strictly for your own use and is ignored
  418.                by Workbench.
  419.     window - pointer to window to add.
  420.     msgport - pointer to message port Workbench will use to send you an
  421.               AppMessage message of type 'MTYPE_APPWINDOW' when your
  422.               window gets an icon or icons dropped in it.
  423.     taglist - ptr to a list of tag items.  Must be NULL for V2.0.
  424.  
  425.    RESULTS
  426.     AppWindow - a pointer to an AppWindow structure which you pass to
  427.                 RemoveAppWindow when you want to remove the window
  428.                 from Workbench's list of AppWindows.  NULL
  429.                 if Workbench was unable to add your window; typically
  430.                 happens when Workbench is not running or under low
  431.                 memory conditions.
  432.  
  433.    SEE ALSO
  434.     workbench.library/AddAppWindowDropZoneA
  435.     workbench.library/RemoveAppWindow
  436.  
  437.    NOTES
  438.     The V2.0 icon editor is an example of an AppWindow.  Note that app
  439.     window applications generally want to call GetDiskObjectNew
  440.     (as opposed to GetDiskObject) to get the disk object for the icon
  441.     dropped in the window.
  442.  
  443.     For this function call to succeed, Workbench must be open. This
  444.     means that the LoadWB command was executed and the Workbench
  445.     screen has been opened.
  446.  
  447.     When removing an AppWindow, all its drop zones will be automatically
  448.     removed.
  449.  
  450. workbench.library/AddAppWindowDropZoneAorkbench.library/AddAppWindowDropZoneA
  451.  
  452.    NAME
  453.     AddAppWindowDropZoneA -- Designate an AppWindow area as suitable for
  454.         dropping icons on. (V44)
  455.  
  456.    SYNOPSIS
  457.     dropZone = AddAppWindowDropZoneA(appWindow,id,userData,tags)
  458.        D0                               A0    D0    D1     A1
  459.  
  460.     struct AppWindowDropZone * AddAppWindowDropZoneA(struct AppWindow *aw,
  461.                                ULONG id,ULONG userData,
  462.                                struct TagItem * tags);
  463.  
  464.     dropZone = AddAppWindowDropZone(appWindow,id,userData,zone,...)
  465.  
  466.     struct AppWindowDropZone * AddAppWindowDropZone(struct AppWindow *aw,
  467.                                ULONG id,ULONG userData,...);
  468.  
  469.    FUNCTION
  470.     Once it is created, Workbench will allow the user to drop an
  471.     icon anywhere inside an AppWindow, regardless of whether the
  472.     icon was dropped on an area designated for dropping icons on
  473.     or not. With AddAppWindowDropZoneA() you can tell Workbench
  474.     which AppWindow areas are suitable for dropping icons on.
  475.  
  476.    INPUTS
  477.     aw -- An AppWindow data structure, as returned by
  478.         workbench.library/AddAppWindowA.
  479.     id -- This variable is strictly for your own use and is ignored by
  480.         Workbench. Typical uses in C are in switch and case statements,
  481.         and in assembly language table lookup. Later, when an icon is
  482.         dropped on the designated area, the AppMessage sent to your
  483.         port will have the am_ID member set to this value.
  484.     userData -- this variable is strictly for your own use and is ignored
  485.         by Workbench. Later, when an icon is dropped on the designated area,
  486.         the AppMessage sent to your port will have the am_UserData member
  487.         set to this value.
  488.     tags -- List of attributes to control the position and size
  489.         of the drop zone.
  490.  
  491.    TAGS
  492.     WBDZA_Left (WORD) -- Left edge of the drop zone; a value of
  493.         0 would create a zone located at the left corner of the
  494.         window.
  495.  
  496.     WBDZA_RelRight (WORD) -- Left edge of the drop zone, relative
  497.         to the window width; a value of -10 would create a zone located
  498.         10 pixels left of the window right edge.
  499.  
  500.     WBDZA_Top (WORD) -- Top edge of the drop zone; a value of
  501.         0 would create a zone located at the top corner of the
  502.         window.
  503.  
  504.     WBDZA_RelBottom (WORD) -- Top edge of the drop zone, relative
  505.         to the window height; a value of -10 would create a zone located
  506.         10 pixels above the window bottom edge.
  507.  
  508.     WBDZA_Width (WORD) -- Width of the drop zone.
  509.  
  510.     WBDZA_RelWidth (WORD) -- Width of the drop zone, relative to the
  511.         width of the window; a value of -20 would create a zone that
  512.         is by 20 pixels narrower than the window.
  513.  
  514.     WBDZA_Height (WORD) -- Height of the drop zone.
  515.  
  516.     WBDZA_RelHeight (WORD) -- Height of the drop zone, relative to the
  517.         height of the window; a value of -20 would create a zone that
  518.         is by 20 pixels smaller than the window.
  519.  
  520.     WBDZA_Box (struct IBox *) -- Position and size of the drop zone.
  521.  
  522.     WBDZA_Hook (struct Hook *) -- Pointer to a hook that will be
  523.         invoked whenever the mouse enters or leaves your drop zone
  524.         area. Your hook will be called with the following parameters:
  525.  
  526.         result = hookFunc(hook,reserved,arm)
  527.           D0               A0     A2     A1
  528.  
  529.         LONG hookFunc(struct Hook *hook,APTR reserved,
  530.                       struct AppWindowDropZoneMsg *adzm);
  531.  
  532.         The reserved parameter will be set to NULL (V44).
  533.         For future enhancement, make sure that your hook
  534.         function always returns NULL (V44).
  535.  
  536.         The drop zone message contents are as follows:
  537.  
  538.             adzm_RastPort
  539.                 A pointer to the RastPort to render into.
  540.                 Typically, this is the RastPort of the window
  541.                 the drop zone is attached to.
  542.  
  543.             adzm_DropZoneBox
  544.                 This member describes the position and size
  545.                 of the drop zone. The zone is guaranteed to
  546.                 be a valid area, i.e. the Width and Height
  547.                 will both be greater than 0 and the Left/Top
  548.                 will be well within the bounds of the window
  549.                 containing the drop zone.
  550.  
  551.             adzm_ID
  552.             adzm_UserData
  553.                 These two come straight from the values you passed
  554.                 as the id and userData parameters to
  555.                 AddAppWindowDropZoneA().
  556.  
  557.             adzm_Action
  558.                 Depending upon whether the mouse has just entered
  559.                 or left the drop zone area, this variable will be
  560.                 set to ADZMACTION_Enter or to ADZMACTION_Leave.
  561.                 Any other values for adzm_Action should be ignored.
  562.  
  563.                 When the mouse enters the drop zone, do your drop
  564.                 zone area highlighting. When the mouse leaves the
  565.                 drop zone, remove any highlighting done in the
  566.                 previous ADZMACTION_Enter pass.
  567.  
  568.                 Note that the mouse leaving your drop zone box
  569.                 does not imply that no icons will be dropped on it.
  570.                 You may still receive a notification lateron, telling
  571.                 you that your drop zone had icons dropped on it.
  572.                 The hook function is solely for highlighting and
  573.                 unhighlighting the drop zone area.
  574.  
  575.         A final word of warning: when your hook code is called, you
  576.         must limit your rendering to simple drawing operations
  577.         from graphics.library; if you do anything complex that
  578.         involves Intuition locking and unlocking the display,
  579.         such as refreshing gadgets or locking IntuitionBase,
  580.         you will deadlock the operating system. You have been
  581.         warned!
  582.  
  583.    RESULT
  584.     dropZone -- A newly created drop zone identifier, or NULL if
  585.         it could not be created; use dos.library/IoErr to find out
  586.         what caused it to fail.
  587.  
  588.    NOTES
  589.     Once an AppWindow has a drop zone installed, Workbench will send
  590.     a new type of AppMessage to your port if icons are dropped on
  591.     a drop zone. Instead of AMTYPE_APPWINDOW type messages you
  592.     will receive AMTYPE_APPWINDOWZONE messages. In fact, you will
  593.     no longer hear any AMTYPE_APPWINDOW type messages since Workbench
  594.     will allow users to drop icons only on drop zones. Be prepared
  595.     to handle this.
  596.  
  597.     Adding a drop zone to an AppWindow does not guarantee that only
  598.     AMTYPE_APPWINDOWZONE type messages will arrive at your message
  599.     port. In fact, the user may be able to drop an icon on the window
  600.     before the first drop zone is installed. Be prepared to handle
  601.     this.
  602.  
  603.     Workbench checks drop zones in the order in which they were added
  604.     to the AppWindow. Thus, if two zones overlap, the zone that was
  605.     added first will be reported as hit.
  606.  
  607.     An AppWindow starts out with its entire area available for dropping
  608.     icons on. Thus, you may receive AppMessages for icons dropped upon
  609.     your AppWindow before you have added the first drop zone to it.
  610.     Be prepared to handle this.
  611.  
  612.     Drop zones must be created with a position and a size. If you omit
  613.     either one, this routine will fail.
  614.  
  615.     When an icon is dropped on a drop zone, the AppMessage am_MouseX and
  616.     am_MouseY members will be relative to the window top left corner;
  617.     they WILL NOT be relative to the left/top edge of the drop zone.
  618.  
  619.    SEE ALSO
  620.     dos.library/IoErr
  621.     workbench.library/AddAppWindowA
  622.  
  623. workbench.library/ChangeWorkbenchSelectionA.library/ChangeWorkbenchSelectionA
  624.  
  625.    NAME
  626.     ChangeWorkbenchSelectionA -- Change the selection states of icons
  627.         displayed by Workbench. (V44)
  628.  
  629.    SYNOPSIS
  630.     success = ChangeWorkbenchSelectionA(name,hook,tags)
  631.        D0                                A0   A1   A2
  632.  
  633.     BOOL ChangeWorkbenchSelectionA(STRPTR name,struct Hook *hook,
  634.                                    struct TagItem *tags);
  635.  
  636.     success = ChangeWorkbenchSelection(name,hook,...);
  637.  
  638.     BOOL ChangeWorkbenchSelection(STRPTR name,struct Hook *hook,...);
  639.  
  640.    FUNCTION
  641.     The icons displayed inside each Workbench window can be in selected
  642.     or in unselected state. This routine allows you to change this state
  643.     for every icon found in a particular window.
  644.  
  645.    INPUTS
  646.     name -- Name of the drawer whose icons should be submitted to the
  647.         callback hook for testing; pass NULL as the name to have the
  648.         icons in the Workbench backdrop (where disks and AppIcons live)
  649.         passed through the hook. Note that the drawer whose icons you
  650.         want to change must be open before you can make any changes.
  651.  
  652.     hook -- Hook to be invoked for each icon in the window.
  653.  
  654.         The hook code will be invoked with the following parameters
  655.  
  656.         action = hookFunc(hook,reserved,ism)
  657.            D0                A0     A2    A1
  658.  
  659.         ULONG hookFunc(struct Hook *hook,APTR reserved,
  660.                        struct IconSelectMsg *ism);
  661.  
  662.         The reserved parameter will be set to NULL (V44).
  663.  
  664.         The IconSelectMsg contents are as follows:
  665.  
  666.             ism_Length
  667.                 Size of the IconSelectMsg data structure (in bytes).
  668.                 Since this message may need to grow in the future,
  669.                 always compare this value against the message size
  670.                 you expect. For V44, ism_Length is guaranteed to
  671.                 contain a value of 36. Expect this value to become
  672.                 larger in the future.
  673.  
  674.             ism_Drawer
  675.                 A lock on the drawer the object in question resides
  676.                 in. This may be NULL for the Workbench backdrop (where
  677.                 disks and AppIcons live).
  678.  
  679.             ism_Name
  680.                 Name of the object in question; please note that for
  681.                 disk icons the name does not end with a colon character
  682.                 (":").
  683.  
  684.             ism_Type
  685.                 This is one of WBDISK, WBDRAWER, WBTOOL, WBPROJECT,
  686.                 WBGARBAGE, WBDEVICE, WBKICK or WBAPPICON.
  687.  
  688.             ism_Selected
  689.                 TRUE if the object in question is currently selected,
  690.                 FALSE otherwise.
  691.  
  692.             ism_Tags
  693.                 The list of tag items passed to ChangeWorkbenchSelectionA().
  694.  
  695.             ism_DrawerWindow
  696.                 If the object in question is a drawer or disk and its
  697.                 associated window is currently open, then you will find
  698.                 a pointer to it here.
  699.  
  700.             ism_ParentWindow
  701.                 This is a pointer to the window the object resides in.
  702.  
  703.             ism_Left
  704.             ism_Top
  705.             ism_Width
  706.             ism_Height
  707.                 These denote the position and size of the object in
  708.                 question, relative to the top left edge of the window
  709.                 it resides in.
  710.  
  711.         With the exception of the ism_Left and ism_Top members, the
  712.         IconSelectMsg is read-only. The ism_Left/ism_Top members can
  713.         be used to change the position of the icon.
  714.  
  715.         You hook code must return one of the following values:
  716.  
  717.             ISMACTION_Unselect
  718.                 Unselect the icon
  719.  
  720.             ISMACTION_Select
  721.                 Select the icon
  722.  
  723.             ISMACTION_Ignore
  724.                 Do not change the selection state of the icon.
  725.  
  726.             ISMACTION_Stop
  727.                 Do not change the selection state of the icon. Do not
  728.                 invoke the hook function again.
  729.  
  730.     tags -- Additional options.
  731.  
  732.    TAGS
  733.     No tags are defined yet (V44).
  734.  
  735.    RESULTS
  736.     result -- FALSE if the drawer in question could not be found,
  737.         TRUE otherwise. If FALSE is returned, you can query the error
  738.         code using dos.library/IoErr().
  739.  
  740.    EXAMPLE
  741.     /* Select the icon labeled "Prefs" in the drawer "SYS:". */
  742.     struct Hook hook;
  743.  
  744.     /* This hook code is responsible for selecting the icon. */
  745.     BOOL
  746.     SelectPrefs(struct Hook *hook,APTR reserved,struct IconSelectMsg *ism)
  747.     {
  748.         /* Remember the old icon select status; if the icon name
  749.          * does not match "Prefs", this is what we will return,
  750.          * not changing anything.
  751.          */
  752.         BOOL selected = ism->ism_Selected;
  753.  
  754.         /* If the name matches, select it. Otherwise, leave its
  755.          * select state alone.
  756.          */
  757.         if(Stricmp(ism->ism_Name,"Prefs") == 0)
  758.             selected = TRUE;
  759.  
  760.         return(selected);
  761.     }
  762.  
  763.     .
  764.     .
  765.     .
  766.  
  767.     /* Set up the hook data structure. */
  768.     hook.h_Entry = HookEntry;
  769.     hook.h_SubEntry = (HOOKFUNC)SelectPrefs;
  770.  
  771.     /* And finally change the selection. */
  772.     ChangeWorkbenchSelection("SYS:",&hook,TAG_END);
  773.  
  774.    NOTES
  775.     The name of the drawer to work on is interpreted relative
  776.     to the current directory of the program to call
  777.     ChangeWorkbenchSelectionA().
  778.  
  779.     For this function call to succeed, Workbench must be open. This
  780.     means that the LoadWB command was executed and the Workbench
  781.     screen has been opened.
  782.  
  783.     While the user is dragging icons, no on-screen rendering may
  784.     take place. In this state Workbench may refuse to execute the
  785.     ChangeWorkbenchSelection() call and return an error code instead
  786.     (ERROR_OBJECT_IN_USE).
  787.  
  788.    SEE ALSO
  789.     dos.library/IoErr
  790.  
  791. workbench.library/CloseWorkbenchObjectAorkbench.library/CloseWorkbenchObjectA
  792.  
  793.    NAME
  794.     CloseWorkbenchObjectA -- Close a drawer as if the user had clicked
  795.         on the window close gadget. (V44)
  796.  
  797.    SYNOPSIS
  798.     success = CloseWorkbenchObjectA(name,tags)
  799.        D0                            A0   A1
  800.  
  801.     BOOL CloseWorkbenchObjectA(STRPTR name,struct TagItem *tags);
  802.  
  803.     success = CloseWorkbenchObject(name,...);
  804.  
  805.     BOOL CloseWorkbenchObject(STRPTR name,...);
  806.  
  807.    FUNCTION
  808.     This routine attempts to close the named object as if the user
  809.     had clicked on its drawer window close gadget.
  810.  
  811.    INPUTS
  812.     name -- Name of the drawer to be closed.
  813.  
  814.     tags -- Additional options.
  815.  
  816.    TAGS
  817.     No tags are defined yet (V44).
  818.  
  819.    RESULTS
  820.     result -- FALSE if the object in question could not be closed,
  821.         TRUE otherwise. If FALSE is returned, you can query the error
  822.         code using dos.library/IoErr().
  823.  
  824.    EXAMPLE
  825.     /* Close the drawer "SYS:" */
  826.     CloseWorkbenchObjectA("SYS:",NULL);
  827.  
  828.    NOTES
  829.     The name of the drawer to be closed is interpreted relative
  830.     to the current directory of the program to call
  831.     CloseWorkbenchObjectA().
  832.  
  833.     For this function call to succeed, Workbench must be open. This
  834.     means that the LoadWB command was executed and the Workbench
  835.     screen has been opened.
  836.  
  837.     While the user is dragging icons, no on-screen rendering may
  838.     take place. In this state Workbench may refuse to execute the
  839.     CloseWorkbenchObject() call and return an error code instead
  840.     (ERROR_OBJECT_IN_USE).
  841.  
  842.    SEE ALSO
  843.     dos.library/IoErr
  844.     workbench.library/OpenWorkbenchObjectA
  845.  
  846. workbench.library/MakeWorkbenchObjectVisibleArary/MakeWorkbenchObjectVisibleA
  847.  
  848.    NAME
  849.     MakeWorkbenchObjectVisibleA -- Change a Workbench window in such a
  850.         way as to make a particular icon visible. (V44)
  851.  
  852.    SYNOPSIS
  853.     success = MakeWorkbenchObjectVisibleA(name,tags)
  854.        D0                                  A0   A1
  855.  
  856.     BOOL MakeWorkbenchObjectVisibleA(STRPTR name,struct TagItem *tags);
  857.  
  858.     success = MakeWorkbenchObjectVisible(name,...);
  859.  
  860.     BOOL MakeWorkbenchObjectVisible(STRPTR name,...);
  861.  
  862.    FUNCTION
  863.     Due to how the scrollers of a Workbench window affect the positions
  864.     of the icons inside that window, some icons may not be drawn inside
  865.     the bounds of the window. By using MakeWorkbenchObjectVisibleA()
  866.     the window scrollers can be made to scroll such a "hidden" icon
  867.     into view.
  868.  
  869.    INPUTS
  870.     name -- Name of the icon to make visible. Note that the window
  871.         the icon resides in must already be open.
  872.  
  873.     tags -- Additional options.
  874.  
  875.    TAGS
  876.     No tags are defined yet (V44).
  877.  
  878.    RESULTS
  879.     result -- FALSE if the icon in question could not be found,
  880.         TRUE otherwise. If FALSE is returned, you can query the error
  881.         code using dos.library/IoErr().
  882.  
  883.    EXAMPLE
  884.     /* Make the icon for the drawer "SYS:" visible. */
  885.     MakeWorkbenchObjectVisible("SYS:",TAG_END);
  886.  
  887.    NOTES
  888.     The name of the icon to make visible is interpreted relative
  889.     to the current directory of the program to call
  890.     MakeWorkbenchObjectVisibleA().
  891.  
  892.     For this function call to succeed, Workbench must be open. This
  893.     means that the LoadWB command was executed and the Workbench
  894.     screen has been opened.
  895.  
  896.     While the user is dragging icons, no on-screen rendering may
  897.     take place. In this state Workbench may refuse to execute the
  898.     MakeWorkbenchObjectVisible() call and return an error code instead
  899.     (ERROR_OBJECT_IN_USE).
  900.  
  901.    SEE ALSO
  902.     dos.library/IoErr
  903.  
  904. workbench.library/OpenWorkbenchObjectA workbench.library/OpenWorkbenchObjectA
  905.  
  906.    NAME
  907.     OpenWorkbenchObjectA -- Open a drawer or launch a program as if
  908.         the user had double-clicked on an icon. (V44)
  909.  
  910.    SYNOPSIS
  911.     success = OpenWorkbenchObjectA(name,tags)
  912.        D0                           A0   A1
  913.  
  914.     BOOL OpenWorkbenchObjectA(STRPTR name,struct TagItem *tags);
  915.  
  916.     success = OpenWorkbenchObject(name,...);
  917.  
  918.     BOOL OpenWorkbenchObject(STRPTR name,...);
  919.  
  920.    FUNCTION
  921.     This routine attempts to open the named object as if the user
  922.     had double-clicked on its icon. This allows you to open drawers
  923.     under program control or to have Workbench launch your programs.
  924.  
  925.    INPUTS
  926.     name -- Name of the object to be opened; this can be a drawer
  927.         name, a tool name or a project name.
  928.  
  929.     tags -- Additional options.
  930.  
  931.    TAGS
  932.     WBOPENA_ArgLock (BPTR) -- Corresponds to the WBArg->wa_Lock
  933.         entry of a WBStartup message, to be sent to a program
  934.         to be launched. The lock you provide will be duplicated
  935.         when it is put into a WBArg list.
  936.  
  937.         The WBOPENA_ArgLock determines the lock parameters
  938.         to be associated with all following WBOPENA_ArgName tags.
  939.  
  940.         This tag defaults to NULL.
  941.  
  942.     WBOPENA_ArgName (STRPTR) -- Corresponds to the WBArg->wa_Name
  943.         entry of a WBStartup message to be sent to a program
  944.         to be launched. This tag can be used to construct a list
  945.         of parameters to pass to the tool/project to be launched.
  946.         It works in conjunction with the WBOPENA_ArgLock tag.
  947.         The name you provide will be duplicated when it is put
  948.         into a WBArg list.
  949.  
  950.    RESULTS
  951.     result -- FALSE if the object in question could not be opened,
  952.         TRUE otherwise. Note that TRUE may be returned even if
  953.         the program the object represents could not be launched;
  954.         this is due to limitations in the current (V44) Workbench
  955.         design. If FALSE is returned, you can query the error
  956.         code using dos.library/IoErr().
  957.  
  958.    EXAMPLE
  959.     /* Launch Multiview with S:Startup-Sequence as its parameter. */
  960.     OpenWorkbenchObject("MultiView",
  961.         WBOPENA_ArgLock, Lock("S:",SHARED_LOCK),
  962.         WBOPENA_ArgName, "Startup-Sequence",
  963.     TAG_DONE);
  964.  
  965.     /* Launch the application "Paint" with the project files "Image1"
  966.      * and "Image2", which are both found in the drawer "Paint:Pictures".
  967.      */
  968.     OpenWorkbenchObject("Paint",
  969.         WBOPENA_ArgLock, Lock("Paint:Pictures",SHARED_LOCK),
  970.         WBOPENA_ArgName, "Image1",
  971.         WBOPENA_ArgName, "Image2",
  972.     TAG_DONE);
  973.  
  974.     /* Launch the application "Paint" with the project files "Image1"
  975.      * and "Anim1", which are both found in the drawers "Paint:Pictures"
  976.      * and "Paint:Animations", respectively.
  977.      */
  978.     OpenWorkbenchObject("Paint",
  979.         WBOPENA_ArgLock, Lock("Paint:Pictures",SHARED_LOCK),
  980.         WBOPENA_ArgName, "Image1",
  981.         WBOPENA_ArgLock, Lock("Paint:Animations",SHARED_LOCK),
  982.         WBOPENA_ArgName, "Anim1",
  983.     TAG_DONE);
  984.  
  985.    NOTES
  986.     You need not specify fully qualified path names for programs to
  987.     be launched. Workbench will look for files without fully
  988.     qualified path names along its default Shell search path.
  989.     In any case, Workbench will look for the tool to be launched
  990.     in the current directory of the program that called
  991.     OpenWorkbenchObjectA(). The same holds true for drawers.
  992.  
  993.     When launching a program, Workbench will automatically figure
  994.     out which tool to use if the object in question is actually a
  995.     project file with a project icon. Note that if the project
  996.     icon's default tool cannot be found, you will not see any
  997.     error message.
  998.  
  999.     Workbench transparently supports launching of Shell programs,
  1000.     but this is not recommended. You should always launch Shell
  1001.     programs from your own process.
  1002.  
  1003.     When you open a drawer, all WBOPENA_Arg[..] parameters you may
  1004.     have provided will be ignored.
  1005.  
  1006.     For this function call to succeed, Workbench must be open. This
  1007.     means that the LoadWB command was executed and the Workbench
  1008.     screen has been opened.
  1009.  
  1010.     While the user is dragging icons, no on-screen rendering may
  1011.     take place. In this state Workbench may refuse to execute the
  1012.     OpenWorkbenchObject() call and return an error code instead
  1013.     (ERROR_OBJECT_IN_USE).
  1014.  
  1015.    SEE ALSO
  1016.     dos.library/IoErr
  1017.     workbench.library/CloseWorkbenchObjectA
  1018.     <workbench/startup.h>
  1019.  
  1020. workbench.library/RemoveAppIcon               workbench.library/RemoveAppIcon
  1021.  
  1022.    NAME
  1023.     RemoveAppIcon - remove an icon from Workbench's list            (V36)
  1024.                          of AppIcons.
  1025.  
  1026.    SYNOPSIS
  1027.     success = RemoveAppIcon(AppIcon)
  1028.          D0                      A0
  1029.  
  1030.     BOOL RemoveAppIcon(struct AppIcon *);
  1031.  
  1032.    FUNCTION
  1033.     Attempt to remove an AppIcon from Workbench's list of AppIcons.
  1034.  
  1035.    INPUTS
  1036.     AppIcon - pointer to an AppIcon structure returned by AddAppIcon.
  1037.  
  1038.    RESULTS
  1039.     success - TRUE if the icon could be removed, FALSE otherwise.
  1040.  
  1041.    NOTES
  1042.     As with anything that deals with asynchronous operation, you will need
  1043.     to do a final check for messages on your AppMessage port for messages
  1044.     that may have come in between the last time you checked and the
  1045.     call to remove the AppIcon.
  1046.  
  1047.    SEE ALSO
  1048.     workbench.library/AddAppIconA
  1049.  
  1050. workbench.library/RemoveAppMenuItem       workbench.library/RemoveAppMenuItem
  1051.  
  1052.    NAME
  1053.     RemoveAppMenuItem - remove a menu item from Workbench's list     (V36)
  1054.                         of AppMenuItems.
  1055.  
  1056.    SYNOPSIS
  1057.     success = RemoveAppMenuItem(AppMenuItem)
  1058.          D0                            A0
  1059.  
  1060.     BOOL RemoveAppMenuItem(struct AppMenuItem *);
  1061.  
  1062.    FUNCTION
  1063.     Attempt to remove an AppMenuItem from Workbench's list
  1064.     of AppMenuItems.
  1065.  
  1066.    INPUTS
  1067.     AppMenuItem - pointer to an AppMenuItem structure returned by
  1068.                   AddAppMenuItem.
  1069.  
  1070.    RESULTS
  1071.     success - TRUE if the menu could be removed, FALSE otherwise.
  1072.  
  1073.    NOTES
  1074.     As with anything that deals with asynchronous operation, you will need
  1075.     to do a final check for messages on your AppMessage port for messages
  1076.     that may have come in between the last time you checked and the
  1077.     call to removed the AppMenuItem.
  1078.  
  1079.    SEE ALSO
  1080.     workbench.library/AddAppMenuItemA
  1081.  
  1082. workbench.library/RemoveAppWindow           workbench.library/RemoveAppWindow
  1083.  
  1084.    NAME
  1085.     RemoveAppWindow - remove a window from Workbench's list         (V36)
  1086.                           of AppWindows.
  1087.  
  1088.    SYNOPSIS
  1089.     success = RemoveAppWindow(AppWindow)
  1090.          D0                        A0
  1091.  
  1092.     BOOL RemoveAppWindow(struct AppWindow *);
  1093.  
  1094.    FUNCTION
  1095.     Attempt to remove an appwindow from Workbench's list of AppWindows.
  1096.  
  1097.    INPUTS
  1098.     AppWindow - pointer to an AppWindow structure returned by
  1099.                 AddAppWindow.
  1100.  
  1101.    RESULTS
  1102.     success - TRUE if the window could be removed, FALSE otherwise.
  1103.  
  1104.    NOTES
  1105.     As with anything that deals with asynchronous operation, you will need
  1106.     to do a final check for messages on your AppMessage port for messages
  1107.     that may have come in between the last time you checked and the
  1108.     call to removed the AppWindow.
  1109.  
  1110.     Before the AppWindow is removed, all its drop zones will be removed
  1111.     first. There is no need for you to call RemoveAppWindowDropZone()
  1112.     for every single one.
  1113.  
  1114.    SEE ALSO
  1115.     workbench.library/AddAppWindowA
  1116.     workbench.library/RemoveAppWindowDropZone
  1117.  
  1118. workbench.library/RemoveAppWindowDropZoneench.library/RemoveAppWindowDropZone
  1119.  
  1120.    NAME
  1121.     RemoveAppWindowDropZone -- Remove a drop zone from an AppWindow.
  1122.  
  1123.    SYNOPSIS
  1124.     success = RemoveAppWindowDropZone(appWindow,dropZone)
  1125.       D0                                 A0        A1
  1126.  
  1127.     BOOL RemoveAppWindowDropZone(struct AppWindow *,
  1128.                                  struct AppWindowDropZone *);
  1129.  
  1130.    FUNCTION
  1131.     Attempt to remove a drop zone from an AppWindow.
  1132.  
  1133.    INPUTS
  1134.     appWindow -- pointer to an AppWindow structure returned by
  1135.         workbench.library/AddAppWindowA. A value of NULL will be
  1136.         ignored.
  1137.     dropZone -- pointer to an AppWindowDropZone returned by
  1138.         workbench.library/AddAppWindowDropZoneA. A value of NULL will
  1139.         be ignored.
  1140.  
  1141.    RESULTS
  1142.     success - TRUE if the drop zone could be removed, FALSE otherwise.
  1143.         The reason for the failure can be obtained using
  1144.         dos.library/IoErr. This routine may fail if the specified drop
  1145.         zone is not registered with the AppWindow.
  1146.  
  1147.    NOTES
  1148.     Due to the asynchronous nature of Workbench/user interaction, you
  1149.     may receive AppIcon drop zone messages for zones that you have
  1150.     just removed. These messages may arrive in the time between your
  1151.     code calling RemoveAppWindowDropZone() and Workbench responding
  1152.     to the drop zone removal request. Be prepared to handle this. Once
  1153.     a drop zone is removed, it will generate no new AppMessages.
  1154.  
  1155.    SEE ALSO
  1156.     workbench.library/AddAppWindowDropZoneA
  1157.  
  1158. workbench.library/WBInfo                             workbench.library/WBInfo
  1159.  
  1160.    NAME
  1161.     WBInfo - Bring up the Information requester                     (V39)
  1162.  
  1163.    SYNOPSIS
  1164.     worked = WBInfo(lock, name, screen)
  1165.     d0              a0    a1    a2
  1166.  
  1167.     ULONG WBInfo(BPTR, STRPTR, struct Screen *);
  1168.  
  1169.    FUNCTION
  1170.     This is the LVO that Workbench calls to bring up the Icon Information
  1171.     requester.  External applications may also call this requester.
  1172.     In addition, if someone were to wish to replace this requester
  1173.     with another one, they could do so via a SetFunction.
  1174.  
  1175.    INPUTS
  1176.     lock   - A lock on the parent directory
  1177.     name   - The name of the icon contained within above directory
  1178.     screen - A screen pointer on which the requester is to show up
  1179.  
  1180.    RESULTS
  1181.     worked - Returns TRUE if the requester came up, FALSE if it did not.
  1182.  
  1183.    NOTE
  1184.     Note that this LVO may be called many times by different tasks
  1185.     before other calls return.  Thus, the code must be 100% re-entrant.
  1186.  
  1187.    SEE ALSO
  1188.     icon.library
  1189.  
  1190. workbench.library/WorkbenchControlA       workbench.library/WorkbenchControlA
  1191.  
  1192.    NAME
  1193.     WorkbenchControlA -- Query or modify Workbench and icon
  1194.         options. (V44)
  1195.  
  1196.    SYNOPSIS
  1197.     success = WorkbenchControlA(name,tags)
  1198.        D0                       A0   A1
  1199.  
  1200.     BOOL WorkbenchControlA(STRPTR name,struct TagItem *tags);
  1201.  
  1202.     success = WorkbenchControl(name,...);
  1203.  
  1204.     BOOL WorkbenchControl(STRPTR name,...);
  1205.  
  1206.    FUNCTION
  1207.     With this function you can query or modify global Workbench
  1208.     parameters or local icon options.
  1209.  
  1210.    INPUTS
  1211.     name -- Name of an object to query or modify.
  1212.  
  1213.     tags -- Additional options.
  1214.  
  1215.    TAGS
  1216.     WBCTRLA_IsOpen (LONG *) -- Check if the named object is
  1217.         currently open. In this case, the function "name"
  1218.         parameter refers to the drawer that should be
  1219.         tested; the result value will be set to TRUE if
  1220.         the named drawer is currently open, FALSE otherwise.
  1221.  
  1222.     WBCTRLA_DuplicateSearchPath (BPTR *) -- This is a safe way
  1223.         to obtain a copy of the Workbench search path list.
  1224.         You will receive a BPTR to a path list, such as can
  1225.         be stored in the cli_CommandDir pointer of a
  1226.         CommandLineInterface structure. Note that this is really
  1227.         a copy of the Workbench search path list and not a reference
  1228.         to the data associated with the Workbench process. Thus,
  1229.         it can be freed by FreeDosObject(DOS_CLI,..), if part of
  1230.         a CommandLineInterface structure.
  1231.  
  1232.     WBCTRLA_FreeSearchPath (BPTR) -- If you did not attach the
  1233.         data returned by the WBCTRLA_DuplicateSearchPath
  1234.         to a CLI, to be freed automatically later, you can
  1235.         pass it back to WorkbenchControlA() to be released.
  1236.  
  1237.     WBCTRLA_GetDefaultStackSize (ULONG *) -- Get the default stack
  1238.         size used by Workbench when launching Shell programs
  1239.         or programs without a valid stack size number.
  1240.  
  1241.         The default stack size is 4096 bytes.
  1242.  
  1243.     WBCTRLA_SetDefaultStackSize (ULONG) -- Set the default stack
  1244.         size used by Workbench when launching Shell programs
  1245.         or programs without a valid stack size number. You cannot
  1246.         set a stack size number smaller than 4096 bytes
  1247.  
  1248.     WBCTRLA_RedrawAppIcon (struct AppIcon *) -- This tag will cause
  1249.         Workbench to redraw an AppIcon. Note that due to which state
  1250.         the Workbench is currently in, it may refuse to redraw the
  1251.         icon.
  1252.  
  1253.     WBCTRLA_GetProgramList (struct List **) -- You can obtain a list
  1254.         of currently running Workbench programs; every entry of this
  1255.         list will have the complete path to the program and the
  1256.         program name in its Node->ln_Name. When you no longer need
  1257.         the list, don't forget to free it again using the tag
  1258.         WBCTRLA_FreeProgramList.
  1259.  
  1260.         Note that the list you will receive may be empty. Be
  1261.         prepared to handle this.
  1262.  
  1263.     WBCTRLA_FreeProgramList (struct List *) -- With this tag you can
  1264.         free the list allocated by the WBCTRLA_GetProgramList tag.
  1265.  
  1266.     WBCTRLA_GetSelectedIconList (struct List **) -- You can obtain a
  1267.         list of currently selected icons; every entry of this
  1268.         list will have the complete path to the icon and the
  1269.         icon name in its Node->ln_Name. Some icons do not enter the
  1270.         list, such as AppIcons. When you no longer need the list,
  1271.         don't forget to free it again using the tag
  1272.         WBCTRLA_FreeSelectedIconList.
  1273.  
  1274.         Note that the list you will receive may be empty. Be
  1275.         prepared to handle this.
  1276.  
  1277.     WBCTRLA_FreeSelectedIconList (struct List *) -- With this tag
  1278.         you can free the list allocated by the
  1279.         WBCTRLA_GetSelectedIconList tag.
  1280.  
  1281.     WBCTRLA_GetOpenDrawerList (struct List **) -- You can obtain a
  1282.         list of currently open drawers and volumes; every entry of this
  1283.         list will have the complete drawer path name in its Node->ln_Name.
  1284.         When you no longer need the list, don't forget to free it
  1285.         again using the tag WBCTRLA_FreeOpenDrawerList.
  1286.  
  1287.         Note that the list you will receive may be empty. Be
  1288.         prepared to handle this.
  1289.  
  1290.     WBCTRLA_FreeOpenDrawerList (struct List *) -- With this tag
  1291.         you can free the list allocated by the
  1292.         WBCTRLA_GetOpenDrawerList tag.
  1293.  
  1294.     WBCTRLA_AddHiddenDeviceName (STRPTR) -- Name of a device which
  1295.         Workbench should not display a disk or device icon for.
  1296.         Any such device will be effectively hidden from the Workbench
  1297.         backdrop. The name must include a terminating colon character,
  1298.         such as in "DF0:".
  1299.  
  1300.         Note that adding new entries to this list may not immediately
  1301.         take effect.
  1302.  
  1303.     WBCTRLA_RemoveHiddenDeviceName (STRPTR) -- Name of a device on
  1304.         the list of devices to be hidden which should be removed.
  1305.         The name must include a terminating colon character,
  1306.         such as in "DF0:". Trying to remove an entry from the list
  1307.         that is not on it will have no effect.
  1308.  
  1309.         Note that removing entries from this list may not immediately
  1310.         take effect.
  1311.  
  1312.     WBCTRLA_GetHiddenDeviceList (struct List **) -- This will obtain
  1313.         the list of devices whose contents which Workbench will not
  1314.         display.
  1315.  
  1316.         Note that the list you will receive may be empty. Be
  1317.         prepared to handle this.
  1318.  
  1319.     WBCTRLA_FreeHiddenDeviceList (struct List *) -- With this tag
  1320.         you can free the list allocated by the
  1321.         WBCTRLA_GetHiddenDeviceList tag.
  1322.  
  1323.     WBCTRLA_GetTypeRestartTime (ULONG *) -- Get the number of seconds
  1324.         that have to pass before typing the next character in a drawer
  1325.         window will restart with a new file name.
  1326.  
  1327.     WBCTRLA_SetTypeRestartTime (ULONG) -- Set the number of seconds
  1328.         that have to pass before typing the next character in a drawer
  1329.         window will restart with a new file name. You must specify a
  1330.         number greater than 0. Default type restart time is 3 seconds.
  1331.  
  1332.    RESULTS
  1333.     result -- FALSE if the requested action could not be performed,
  1334.         TRUE otherwise. If FALSE is returned, you can query the error
  1335.         code using dos.library/IoErr().
  1336.  
  1337.    NOTES
  1338.     If this function returns FALSE, the expected result is undefined.
  1339.     For example, if you tried to obtain the list of currently running
  1340.     programs via the WBCTRLA_GetProgramList tag and WorkbenchControl()
  1341.     failed with an error code, do not expect the List pointer you
  1342.     passed in to be initialized.
  1343.  
  1344.     This function may only be called by a Process.
  1345.  
  1346.     This function may not process all tags if the Workbench is not
  1347.     currently open. For V44, the following tags are support if
  1348.     Workbench is closed:
  1349.  
  1350.         WBCTRLA_SetDefaultStackSize
  1351.         WBCTRLA_GetDefaultStackSize
  1352.         WBCTRLA_FreeHiddenDeviceList
  1353.         WBCTRLA_GetHiddenDeviceList
  1354.         WBCTRLA_AddHiddenDeviceName
  1355.         WBCTRLA_RemoveHiddenDeviceName
  1356.         WBCTRLA_SetTypeRestartTime
  1357.         WBCTRLA_GetTypeRestartTime
  1358.  
  1359.    EXAMPLE
  1360.     /* Obtain a copy of the Workbench search path list, then
  1361.      * release it again.
  1362.      */
  1363.     BPTR pathList;
  1364.  
  1365.     if(WorkbenchControl(NULL,
  1366.         WBCTRLA_DuplicateSearchPath,&pathList,
  1367.     TAG_DONE))
  1368.     {
  1369.         WorkbenchControl(NULL,
  1370.             WBCTRLA_FreeSearchPath,pathList,
  1371.         TAG_DONE);
  1372.     }
  1373.  
  1374.     /* Check if the drawer "SYS:" is open. */
  1375.     LONG isOpen;
  1376.  
  1377.     if(WorkbenchControl("SYS:",
  1378.         WBCTRLA_IsOpen,&isOpen,
  1379.     TAG_DONE))
  1380.     {
  1381.         Printf("Drawer \"SYS:\" is %s.\n",
  1382.             isOpen ? "open" : "closed");
  1383.     }
  1384.  
  1385.     /* Print the list of all currently running
  1386.      * Workbench programs, then free the list again.
  1387.      */
  1388.     struct List * list;
  1389.  
  1390.     if(WorkbenchControl(NULL,
  1391.         WBCTRLA_GetProgramList,&list,
  1392.     TAG_DONE))
  1393.     {
  1394.         struct Node * node;
  1395.  
  1396.         for(node = list->lh_Head ;
  1397.             node->ln_Succ != NULL ;
  1398.             node = node->ln_Succ)
  1399.         {
  1400.             Printf("%s\n",node->ln_Name);
  1401.         }
  1402.  
  1403.         WorkbenchControl(NULL,
  1404.             WBCTRLA_FreeProgramList,list,
  1405.         TAG_DONE);
  1406.     }
  1407.  
  1408.    SEE ALSO
  1409.     dos.library/FreeDosObject
  1410.     dos.library/IoErr
  1411.     <dos/dosextens.h>
  1412.  
  1413.